<template>
<div class="upload-body">
  <div class="upload-item">
    游戏内容（请打包为zip格式）
    <form action="http://localhost:5000/files/upload" method="post" enctype="multipart/form-data">
      <input type="file" style="margin-left: 30px;width: 400px;height: 40px;font-size: 24px" name="file" id="gamefile" value="" multiple="multiple" required/>
      <div class="upload-item">
        游戏名称：
        <input class="upload-input" type="text" name="gamename" multiple="multiple" required>
      </div>
      <div class="upload-item">
        游戏介绍：
        <input class="upload-input" type="text" name="gamedesc" multiple="multiple" required>
      </div>
      <input v-show="false" type="text" :value="username" name="username" multiple="multiple">
      <input v-show="false" type="text" :value="userid" name="userid" multiple="multiple">
      <input type="submit" class="upload-button" value="提交"/>
    </form>
  </div>
  <div class="contain-close-button" @click="this.$parent.closegameup">x</div>
</div>
</template>

<script>
import { ElUpload,ElButton } from 'element-plus'
export default {
  name: "uploadgame",
  components:{
    ElUpload,
    ElButton
  },
  data(){
    return{
      username: 'admin',
      userid: 1
    }
  }
}
</script>

<style scoped>
.upload-input{
  height: 30px;
  border: #1c2938 1px solid;
}
.upload-item{
  padding: 30px;
  font-size: 24px;
  color: white;
}
.upload-body{
  width: 50VW;
  height: 50VH;
  position: fixed;
  top: 25VH;
  left: 25VW;
  background-color: #1c2937;
}
.contain-close-button{
  position: absolute;
  top: 0;
  right: 0;
  font-size: 35px;
  width: 35px;
  height: 35px;
  cursor: pointer;
  color: #fff;
}
.upload-button{
  position: absolute;
  bottom: 30px;
  right: 30px;
  font-size: 24px;
  width: 60px;
  height: 40px;
  cursor: pointer;
}
</style>
